#!/usr/bin/python3

from tkinter import *
from tkinter import ttk
from tkinter import messagebox
from tkinter import filedialog
from tkinter import colorchooser

class App():
    def __init__(self):
        self.root = Tk()
        self.addFrame()

    def addFrame(self):
        self.frame = Frame(self.root)

    def createTopLevel(self):
        self.top = Toplevel()
        self.top.title("TopLevel")

        self.msg = Message(self.top, text="toplevel created")
        self.msg.pack()

    def addButton(self):
        self.button = Button(
                self.root, 
                text="create TopLevel", 
                command=self.createTopLevel)
        self.button.pack()

    def run(self):
        self.addButton()
        self.root.mainloop()

if __name__ == "__main__":
    app = App()
    app.run()
